Fix BUG_ON on switch_mm if XENFEAT_writable_page_tables is enabled.
authorIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Wed, 9 Aug 2006 10:26:11 +0000 (11:26 +0100)
committerIan.Campbell@xensource.com <Ian.Campbell@xensource.com>
Wed, 9 Aug 2006 10:26:11 +0000 (11:26 +0100)
Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h

index 020be5aa07ff1c6f00c4224fcbcb3ca0d0685855..317d597e92bc0d21820eaafcd648a7e2a21801c9 100644 (file)
@@ -51,7 +51,8 @@ static inline void switch_mm(struct mm_struct *prev,
        struct mmuext_op _op[2], *op = _op;
 
        if (likely(prev != next)) {
-               BUG_ON(!test_bit(PG_pinned, &virt_to_page(next->pgd)->flags));
+               BUG_ON(!xen_feature(XENFEAT_writable_page_tables) &&
+                      !test_bit(PG_pinned, &virt_to_page(next->pgd)->flags));
 
                /* stop flush ipis for the previous mm */
                cpu_clear(cpu, prev->cpu_vm_mask);